<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class admin_config_model extends CI_Model
{

    public function __construct()
    {
        // Call the Model constructor
        parent::__construct();        
    }        
       
    function get_config_by_id($id)
    {
    	$this->db->select('*')->from('landing_config')->where('id',$id);
    	$rs = $this->db->get();
    	if ($rs->num_rows() == 0) {
            $rs->free_result();
            return false;
        } else {
            $return = $rs->result_array();            
            $rs->free_result();            
            return $return[0];
        }
    }       
    
    function update_config($data){    	
    	$this->db->where('id', $data['id']);
    	return $this->db->update('landing_config',$data);
    }       
}